# -*- coding:utf-8 -*-
import os
class ReadTestFile:
    def __init__(self):
        pass

    def readfile(self):
        self.rtf = open("extScript\\UserNo.txt", "r")
        userno = self.rtf.read()
        self.rtf.close()
        self.writefile(userno)
        return userno

    def writefile(self,struserno=None):
        self.wtf = open("extScript\\UserNo.txt", "w")
        self.wtf.write(str(int(struserno) + 1))
        self.wtf.close()
        #self.rtf.flush()

    def get_danganno(self):
        rtfd = open("extScript\\DangAnNO.txt", "r")
        danganno = rtfd.read()
        rtfd.close()
        return danganno

class ReadTextFile_DangAnNO:
    def __init__(self):
        rtfd = open("extScript\\DangAnNO.txt", "r")
        danganno = rtfd.read()
        rtfd.close()
        return danganno


if __name__ == '__main__':
    rtf = ReadTestFile()
    rtf.writefile(rtf.readfile())
    print(rtf.readfile())
    #rtf.writefile()
    #print(int(rtf.readfile())+1)
